<f:view xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:c="http://java.sun.com/jstl/core"
        xmlns:af="http://myfaces.apache.org/trinidad"
        xmlns:afh="http://myfaces.apache.org/trinidad/html">
    <f:loadBundle basename="ProcessPortalMessages" var="localeBundle" />
    <f:loadBundle basename="CommonMessages" var="commonMsg" />
    <af:document title="#{commonMsg.filter}">
        <af:form>
            <af:panelPage>
                <f:facet name="messages">
                    <af:messages id="globalFilterDialogMessages"/>
                </f:facet>
                <f:facet name="navigation2">
                    <af:navigationPane hint="bar" styleClass="descriptorFilterNavBar">
                        <af:commandNavigationItem id="apply-button"
                            textAndAccessKey="#{commonMsg.apply}" text="#{commonMsg.apply}"
                            action="#{descriptorFilter.applyFilter}" />
                        <af:commandNavigationItem id="cancel-button"
                            textAndAccessKey="#{commonMsg.cancel}" text="#{commonMsg.cancel}"
                            action="#{descriptorFilter.cancel}"
                            immediate="true" />
                    </af:navigationPane>
                </f:facet>
                <af:spacer height="10"/>
                <af:selectOneChoice id="chooseProcess" label="#{localeBundle.chooseProcess}" 
                    value="#{descriptorFilter.selectedProcess}" autoSubmit="true"
                    valueChangeListener="#{descriptorFilter.onProcessChange}" >
                    <f:selectItems value="#{descriptorFilter.allProcesses}" />
                </af:selectOneChoice>
                <af:spacer height="10"/>

                <af:panelBox partialTriggers="chooseProcess" styleClass="descriptorFilterPanelBox"
                	text="#{localeBundle.descriptors}">
                    <af:panelFormLayout width="100%" rendered="#{not empty descriptorFilter.dataItems}">

						<af:selectBooleanCheckbox selected="#{descriptorFilter.enabled}"
							label="#{localeBundle.filterIsEnabled}" />
			
                		<af:spacer height="10"/>

                        <c:forEach var="dataItem" varStatus="iter" items="#{descriptorFilter.dataItems}" >
				        	<ui:include src="/carnot/include/input-field.xhtml">
				        		<ui:param name="fieldModel" value="#{dataItem}" />
                                <ui:param name="index" value="#{iter.index}" />
                                <ui:param name="showStructuredTypeAsTextField" value="true"/>
				        	</ui:include>
                        </c:forEach>

                    </af:panelFormLayout>
                </af:panelBox>
            </af:panelPage>
        </af:form>
    </af:document>
</f:view>